<?php
$title = "Internal page rank checker";
require_once("../header.php");
?>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript">

var LINKS_FOUND_MAX = 500;
var TOTAL_TIME_MAX = 600;

var dataObj = new Date();
var mytime = dataObj.getTime();
var tout;

function startTime()
{
	dataObj2 = new Date();
	t = dataObj2.getTime();
	t = (t - mytime)/(1000);

	if (typeof TOTAL_TIME_MAX != 'undefined' && t > TOTAL_TIME_MAX)
	{
		exit_search();
	}
	//if (typeof TOTAL_LINKS_MAX != 'undefined' && typeof LINKS_FOUND_MAX != 'undefined' && LINKS_FOUND_MAX >= TOTAL_LINKS_MAX)
	//{
		//exit_search();
	//}

	document.getElementById('txt').innerHTML = 'Time elapsed: '+Math.floor(t/60)+':'+Math.round(t%60)+' Mins';
	tout = setTimeout('startTime()',500);
}

function exit_search() {
	document.getElementById('txt').innerHTML = '';
	clearTimeout(tout);
}
</script>